import {getProductByCategoryId} from "../../../src/api/api";
export default {
  data(){
    return{
      product:"Amazon Parrot",
      category:{

      },
      categoryId: "",
      productList:[

      ],
    }
  },
  mounted() {
    this.categoryId = this.$route.query.catId;
    this.getCatalog();
  },
  methods:{
    sortItem(id) {
      this.categoryID=id;

    },
    getCatalog(){
      getProductByCategoryId(this.categoryId).then((res) =>{
        this.productList = res.data.data;
      })
    }
  }

}
